﻿@using System.Data
@{
    ViewBag.Title = "AdminManage";
    Layout = "~/Views/Shared/_BootstrapUI.cshtml";
}

<style>
    #imgmask {
        width: 60px;
        height: 60px;
        position: absolute;
        top: 0;
        background: rgba(0,0,0,0.2) url(../../Upload/Avatar/gougou.png) no-repeat bottom right;
        -ms-background-size: 30px 30px;
        background-size: 30px 30px;
        z-index: 999;
        display: none;
    }

    img {
        width: 60px;
        height: 60px;
        margin: 0;
        padding: 0;
    }

    #img1 {
        position: relative;
    }
</style>
<div class="panel panel-default mb0">
    <input type="hidden" id="btn_val" />
    <div id="btnOp" class="panel-heading">
    </div>
    <div class="panel-body bt panel-body-dt-normal">
        <div class="table-responsive">
            <table id="dt_admin" class="table table-striped nowrap"></table>
        </div>
    </div>
</div>
<div id="adminManageModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabelLarge" aria-hidden="true" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" data-dismiss="modal" aria-label="Close" class="close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 id="title" class="modal-title"></h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal">
                    <div class="form-group">
                        <label class="col-md-2 control-label">用户账号</label>
                        <div class="col-md-10">
                            <input id="id" type="hidden" value="-1" />
                            <input id="username" type="text" placeholder="Account" class="form-control" required="required" data-parsley-error-message="请输入账号..." />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">用户姓名</label>
                        <div class="col-md-10">
                            <input id="pname" type="text" placeholder="Name" class="form-control" required="required" data-parsley-error-message="请输入姓名..." />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">角色</label>
                        <div class="col-md-10">
                            <select id="rolecode" name="rolecode" required="required" class="selectpicker show-tick form-control" data-live-search="false">
                                @{
                                    FZKJ.BLL.sys_roleinfo bllRoleinfo = new FZKJ.BLL.sys_roleinfo();
                                    DataTable dt = bllRoleinfo.GetList("roletype=0").Tables[0];
                                    foreach (DataRow dr in dt.Rows)
                                    {
                                        <option value='@(dr["rolecode"])'>@(dr["rolename"])</option>
                                    }
                                }
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">联系电话</label>
                        <div class="col-md-10">
                            <input id="phone" type="number" placeholder="Phone" class="form-control" data-parsley-maxlength="11" data-parsley-error-message="请输入11位以内的手机号..." />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">微信号</label>
                        <div class="col-md-10">
                            <input id="wechat" type="text" placeholder="Wechat" class="form-control" required="required" data-parsley-error-message="请输入微信号..." />
                        </div>
                    </div>
                    @*<div class="form-group">
                        <label class="col-md-2 control-label">登陆密码</label>
                        <div class="col-md-10">
                            <input id="password" type="password" value="888888" placeholder="password" class="form-control" required="required" data-parsley-error-message="请输入登陆密码..." />
                        </div>
                    </div>*@
                    <div class="form-group">
                        <label class="col-md-2 control-label">头像</label>
                        @*<div class="col-md-2"><img src="~/Upload/Avatar/0.jpg" imgindex="0" alt="Avatar" class="img-thumbnail img-circle" /></div>*@
                        <div class="col-md-10">
                            <input type="file" data-input="true" data-buttonname="btn btn-info" data-buttontext="选择头像图片" accept=".jpg,.jpeg,.png"
                                   data-iconname="fa fa-upload mr" class="form-control filestyle" id="filestyle-0" tabindex="-1" style="position: absolute; clip: rect(0px 0px 0px 0px);">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label"></label>
                        <div class="col-md-10">
                            <input id="avatar" type="hidden" value="-1" />
                            <img src="~/Upload/Avatar/0.jpg" imgindex="0" alt="Avatar" class="img-thumbnail img-circle" />
                            <img src="~/Upload/Avatar/1.jpg" imgindex="1" alt="Avatar" class="img-thumbnail img-circle" />
                            <img src="~/Upload/Avatar/2.jpg" imgindex="2" alt="Avatar" class="img-thumbnail img-circle" />
                            <img src="~/Upload/Avatar/3.jpg" imgindex="3" alt="Avatar" class="img-thumbnail img-circle" />
                            <img src="~/Upload/Avatar/4.jpg" imgindex="4" alt="Avatar" class="img-thumbnail img-circle" />
                            <img src="~/Upload/Avatar/5.jpg" imgindex="5" alt="Avatar" class="img-thumbnail img-circle" />
                            <img src="~/Upload/Avatar/6.jpg" imgindex="6" alt="Avatar" class="img-thumbnail img-circle" />
                            <p id="imgmask" class="img-circle"></p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">备注</label>
                        <div class="col-md-10">
                            <input id="remark" type="text" placeholder="Remark" class="form-control" />
                        </div>
                    </div>

                </form>
            </div>
            <div class="modal-footer">
                <button type="button" data-dismiss="modal" class="btn btn-default">关闭</button>
                <button id="btnSave" type="button" class="btn btn-primary">保存</button>
            </div>
        </div>
    </div>
</div>

<link href="~/Content/select/bootstrap-select.min.css" rel="stylesheet" />
<script src="~/Content/select/bootstrap-select.js"></script>
<script src="~/Scripts/filestyle.js"></script>
<script src="~/Pscripts/User/AdminManage.js"></script>